package com.guli.mall.wms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.common.utils.PageUtils;
import com.guli.mall.wms.entity.PurchaseDetailEntity;
import com.guli.mall.wms.entity.PurchaseEntity;
import com.guli.mall.wms.entity.vo.PurchaseWithPurchaseDetailListVo;

import java.util.List;

/**
 * 采购信息
 *
 * @author 罗俊华
 * @email 1007052116@qq.com
 * @date 2020-09-29 21:37:28
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils<PurchaseEntity> queryPage(Integer currentPage, Integer size);

    Page<PurchaseEntity> searchPurchaseMenu(PurchaseEntity purchaseEntity, Integer currentPage, Integer size);

    /**
     *
     * @param purchaseDetailEntityList
     * @param purchaseEntity 采购单，为null的时候，自动新建一个采购单，如果不为null，就使用传入的采购单
     * @return
     */
    PurchaseEntity createPurchasingMenuAndMergeToIt(List<PurchaseDetailEntity> purchaseDetailEntityList,PurchaseEntity purchaseEntity);

    Page<PurchaseEntity> buyerGetPurchaseMenuList(Long currentPage, Integer size, Long buyerId);

    void getPurchaseMenu(List<Long> purchaseIdList);

    void submitPurchasingResult(PurchaseWithPurchaseDetailListVo purchaseWithPurchaseDetailListVo);
}

